de.cebis.moccabox.monitoring
Class DomainAccessInterceptor

java.lang.Object
  extended by de.cebis.moccabox.monitoring.DomainAccessInterceptor
All Implemented Interfaces:
java.io.Serializable, org.hibernate.Interceptor

public class DomainAccessInterceptor
extends java.lang.Object
implements org.hibernate.Interceptor, java.io.Serializable

Interceptor, der benachrichtigt wird, bevor auf ein Konzept lesend oder schreibend in der Datenbasis zugegriffen wird. Der DomainAccessInterceptor hat dann die Möglichkeit, weitere Attribute des Konzepts zu aktualisieren.

Author:
weichelt - 03.06.2005
See Also:
Serialized Form

Constructor Summary
DomainAccessInterceptor()
          Paramterloser Konstruktor zum Erzeugen eines neuen DomainAccessInterceptor.
 
Method Summary
 void afterTransactionBegin(org.hibernate.Transaction tx)
           
 void afterTransactionCompletion(org.hibernate.Transaction tx)
           
 void beforeTransactionCompletion(org.hibernate.Transaction tx)
           
 int[] findDirty(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.Object[] arg3, java.lang.String[] arg4, org.hibernate.type.Type[] types)
           
 java.lang.Object getEntity(java.lang.String entityName, java.io.Serializable id)
           
 java.lang.String getEntityName(java.lang.Object entity)
           
 java.lang.Object instantiate(java.lang.String entityName, org.hibernate.EntityMode entityMode, java.io.Serializable id)
           
 java.lang.Boolean isTransient(java.lang.Object entity)
           
 void onDelete(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onFlushDirty(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onLoad(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 void postFlush(java.util.Iterator entities)
           
 void preFlush(java.util.Iterator entities)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainAccessInterceptor

public DomainAccessInterceptor()
Paramterloser Konstruktor zum Erzeugen eines neuen DomainAccessInterceptor.

Method Detail

onLoad

public boolean onLoad(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Specified by:
onLoad in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onFlushDirty

public boolean onFlushDirty(java.lang.Object entity,
                            java.io.Serializable id,
                            java.lang.Object[] currentState,
                            java.lang.Object[] previousState,
                            java.lang.String[] propertyNames,
                            org.hibernate.type.Type[] types)
                     throws org.hibernate.CallbackException
Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onSave

public boolean onSave(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Specified by:
onSave in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onDelete

public void onDelete(java.lang.Object entity,
                     java.io.Serializable id,
                     java.lang.Object[] state,
                     java.lang.String[] propertyNames,
                     org.hibernate.type.Type[] types)
              throws org.hibernate.CallbackException
Specified by:
onDelete in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

preFlush

public void preFlush(java.util.Iterator entities)
              throws org.hibernate.CallbackException
Specified by:
preFlush in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

postFlush

public void postFlush(java.util.Iterator entities)
               throws org.hibernate.CallbackException
Specified by:
postFlush in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

isTransient

public java.lang.Boolean isTransient(java.lang.Object entity)
Specified by:
isTransient in interface org.hibernate.Interceptor

findDirty

public int[] findDirty(java.lang.Object entity,
                       java.io.Serializable id,
                       java.lang.Object[] state,
                       java.lang.Object[] arg3,
                       java.lang.String[] arg4,
                       org.hibernate.type.Type[] types)
Specified by:
findDirty in interface org.hibernate.Interceptor

instantiate

public java.lang.Object instantiate(java.lang.String entityName,
                                    org.hibernate.EntityMode entityMode,
                                    java.io.Serializable id)
                             throws org.hibernate.CallbackException
Specified by:
instantiate in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

getEntityName

public java.lang.String getEntityName(java.lang.Object entity)
                               throws org.hibernate.CallbackException
Specified by:
getEntityName in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

getEntity

public java.lang.Object getEntity(java.lang.String entityName,
                                  java.io.Serializable id)
                           throws org.hibernate.CallbackException
Specified by:
getEntity in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

afterTransactionBegin

public void afterTransactionBegin(org.hibernate.Transaction tx)
Specified by:
afterTransactionBegin in interface org.hibernate.Interceptor

beforeTransactionCompletion

public void beforeTransactionCompletion(org.hibernate.Transaction tx)
Specified by:
beforeTransactionCompletion in interface org.hibernate.Interceptor

afterTransactionCompletion

public void afterTransactionCompletion(org.hibernate.Transaction tx)
Specified by:
afterTransactionCompletion in interface org.hibernate.Interceptor